<template>
  <div>
    <h5>您访问的页面不存在</h5>
    <h6>将在{{ num }}秒后跳回首页</h6>
    <van-button
      type="primary"
      @click="
        () => {
          this.$router.replace('/layout');
        }
      "
      >点击立即返回</van-button
    >
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  data () {
    return {
      num: 10
    }
  },
  created () {
    setTimeout(() => {
      this.$router.replace('/layout')
    }, 10000)
    setInterval(() => {
      this.num -= 1
    }, 1000)
  },
  destroyed () {
    clearInterval()
  },
  methods: {}
}
</script>

<style></style>
